﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="QuanLySanPham.aspx.cs" Inherits="QuanLySanPham" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
     <table width="100%"  bgcolor="#FF99CC">
        <tr>
            <td style="font-weight:bold; color:Blue; font-size:x-large;">Quản lý sản phẩm</td>
        </tr>
    </table>

    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
             <asp:DataList ID="dtlSanPham" runat="server" RepeatColumns="1" 
                onitemcommand="dtlSanPham_ItemCommand" Width="100%" ShowHeader="true" >
                
                <ItemTemplate>
                     <asp:Label ID="lbID" runat="server" Text='<%# Eval("ID") %>' Width="22px" 
                                Height="18px" BorderColor="Blue" BorderStyle="Double" />
                     <asp:TextBox ID="txtTenSanPham" runat="server"
                             Text='<%# Eval("TenSanPham") %>' ReadOnly="true" BackColor="DarkGray" TextMode="MultiLine" 
                              ForeColor="Blue" Width="250px" Height="18px" Font-Bold="true"/>
                     <asp:TextBox ID="txtGiaBanHienTai" runat="server" Text='<%# Eval("GiaBanHienTai") %>'
                            ReadOnly="true" Width="100px" Height="18px" Font-Bold="true" BackColor="DarkGray"/>
                     <asp:ImageButton ID="imbID" runat="server" Width="40px" Height="40px" 
                                    ImageUrl='<%# "~/Image/" + Eval("HinhSanPham") %>' 
                         CommandName="ChiTietSanPham" />
                     <asp:FileUpload ID="fiulImage" runat="server" BorderColor="Blue"
                        BorderWidth="1px"  Visible="false" Width="210px" Height="22px"/>
                     <asp:Button ID="bttUpload" runat="server" Text="Upload"  Visible="false" 
                         Width="80px" Height="22px" ForeColor="Red" CommandName="Upload" />
                     <asp:TextBox ID="txtSoLuotXem" runat="server" Width="50px" Height="18px"  
                                    Text='<%# Eval("SoLuotXem") %>' ReadOnly="true" BackColor="DarkGray"/>
                     <asp:TextBox ID="txtSoLuotMua" runat="server" Width="50px" Height="18px" 
                                    Text='<%# Eval("SoLuotMua") %>'  ReadOnly="true" BackColor="DarkGray"/>
                     <asp:ImageButton ID="imbEdit" runat="server" ImageUrl="~/Images/edit.png" 
                                    Width="25px" Height="25px" CommandName="Edit" ToolTip="Chỉnh sửa"/>
                     <asp:ImageButton ID="imbEditImage" runat="server" ImageUrl="~/Images/image_edit.png" 
                                    Width="25px" Height="25px" CommandName="EditImage" ToolTip="Đổi hình sản phẩm"/>
                     <asp:ImageButton ID="imbDelete" runat="server" ImageUrl="~/Images/delete.png" 
                                    Width="25px" Height="25px" CommandName="Delete"  ToolTip="Xóa" />
                     
                </ItemTemplate>
             </asp:DataList>
        </ContentTemplate>
        
    </asp:UpdatePanel>
    
    <br /><br /><br /><br /><br /><br /><br /><br /><br />
    <br /><br /><br /><br /><br /><br /><br /><br /><br />
    <br /><br /><br /><br /><br />
    <asp:ImageButton ID="imbPrevious" runat="server"  ImageUrl="~/Images/previous.png" 
    Width="25px" Height="20px" ToolTip="Trang trước" onclick="imbPrevious_Click" 
        BorderStyle="Double" BorderWidth="1px"/>
    <asp:ImageButton ID="imbNext" runat="server"  ImageUrl="~/Images/next.png" 
    Width="25px" Height="20px" ToolTip="Trang sau" onclick="imbNext_Click" 
        BorderStyle="Double" BorderWidth="1px"/>
     <CC1:COLLECTIONPAGER id="CollectionPager3" runat="server"  MaxPages="1">
    </CC1:COLLECTIONPAGER> 
    
</asp:Content>
